import request from '@/utils/request'

const baseUrl = '/api/teacher'

/**
 * 老师字段
 */


//  获取老师所在班级课程的个人信息以及班级信息
export function courseInfoGet(params: any) {
    return request({
        url: baseUrl + "/course/classes",
        method: "get",
        params: {
            courseId: params,
        }
    });
}
//  老师课程分页
export function teaCoursePage(data: any) {
    return request({
        url: baseUrl + "/course/page",
        method: "post",
        data: data,
    });
}


//  获取所有专业名称
export function allSpecializedName() {
    return request({
        url: baseUrl + "/course/specialized",
        method: "get",
    });
}

//  获取课程所在学校编号
export function collegeNumberGet(id: any) {
    return request({
        url: baseUrl + "/course/number",
        method: "get",
        params: {
            id: id
        }
    });
}

// 老师添加课程信息
export function courseSave(data: any) {
    return request({
        url: baseUrl + "/course/save",
        method: "post",
        data: data,
    });
}

// 获取老师布置的作业信息
export function homeworkTeaGetById(data: any) {
    return request({
        url: baseUrl + "/homework",
        method: "post",
        data:data,
    });
}

// 老师添加课程
export function homeworkTeaSave(data: any) {
    return request({
        url: baseUrl + "/homework/add",
        method: "post",
        data:data,
    });
}


// 获取老师作业
export function homeworkTeaGet(data: any) {
    return request({
        url: baseUrl + "/homework/get",
        method: "post",
        data:data,
    });
}
// 获取老师作业详情信息
export function homeworkTeaGetDetail(data: any) {
    return request({
        url: baseUrl + "/homework/get/detail",
        method: "post",
        data:data,
    });
}

// 获取所有学生的作业信息
export function toGetHomeworkByTea(data: any) {
    return request({
        url: baseUrl + "/homework/all",
        method: "post",
        data:data,
    });
}



// 老师获取工作台需要的信息
export function toGetWorkBenchInfoTea(data: any) {
    return request({
        url: baseUrl + "/homework/workbench",
        method: "post",
        data:data,
    });
}

// 老师修改作业
export function toChangeHomework(data: any) {
    return request({
        url: baseUrl + "/homework/change",
        method: "post",
        data:data,
    });
}

// 老师批阅学生作业
export function toUpdateStuHomework(data: any) {
    return request({
        url: baseUrl + "/homework/update",
        method: "post",
        data:data,
    });
}